import request from '@/utils/request'
// 创建报修记录
export function noauthcreate(data) {
  return request({
    url: 'http://39.107.228.222:48080/app-api/repair/repair/create',
    method: 'post',
    data: data
  })
}
// 创建报修记录
export function create(data) {
  return request({
    url: '/repair/repair/create',
    method: 'post',
    data: data
  })
}

// 更新报修记录
export function update(data) {
  return request({
    url: '/repair/repair/update',
    method: 'put',
    data: data
  })
}

// 删除报修记录
export function deleteone(id) {
  return request({
    url: '/repair/repair/delete?id=' + id,
    method: 'delete'
  })
}

// 获得报修记录
export function get(id) {
  return request({
    url: '/repair/repair/get?id=' + id,
    method: 'get'
  })
}

// 获得报修记录分页
export function getPage(params) {
  return request({
    url: '/repair/repair/page',
    method: 'get',
    params
  })
}
// 导出报修记录 Excel
export function exportExcel(params) {
  return request({
    url: '/repair/repair/export-excel',
    method: 'get',
    params,
    responseType: 'blob'
  })
}
